using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter39
{
	/// <summary>
	/// Example03: The Contraction of a Spacecraft
	/// A spacecraft is measured to be 120.0 m long and 20.0 m in 
	/// diameter while at rest relative to observer. If this 
	/// spacecraft now flies by the observer with a speed of 0.99c, 
	/// what length and diameter does the observer measure? 
	/// </summary>
	public class Example03
	{
		public Example03()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Length s = new L.Length();
			s.m = 120.0;
			L.Velocity v = new L.Velocity();
			v.X = 0.99*L.Constant.SpeedOfLightInVacuum;
			L.Length sp = L.Relativity.LengthContraction(s,v);
			result+=Convert.ToString(sp.m)+"\r\n";
		}	
	}
}
